This invention relates to imaging systems, such as printers, and, more particularly, to a technique for reducing quantization errors when printing varying shades of a color to avoid visible contouring or banding in the printed image.
A conventional color printer, such as an inkjet printer that prints dots of primary color inks on a medium, is frequently used to reproduce a color image from a monitor that smoothly changes the shade of a color from, for example, white to blue. However, due to limitations in the printer, each of the shades created by a computer for display on the monitor may not be accurately reproduced by the printer on the medium. One reason for this is that the amount of ink deposited for each pixel location on the medium is limited to a maximum number of ink drops. As a result, two or more different shades of a color displayed on a monitor are often reproduced as the same printed color by the printer. Thus, when printing a continuous change of shade, visible gradations between the shades occur due to the color step quantization by the printer being larger than the original quantization by the computer when creating the image.
Reasons other than the printer""s limit on the amount of ink that can be deposited in a pixel location on the medium also account for this undesirable contouring or banding, but the limitation on the amount of ink deposited will be used as an example to illustrate how contouring or banding results.
Colors are typically created by a conventional computer for display on a monitor using the RGB color space. Typically, each primary color is identified with an 8-bit value, giving 256 levels per primary, so that the complete RGB color is specified as a 24-bit value. Ink printers typically print using cyan (C), magenta (M), and yellow (Y) inks. When an RGB input value specifies the range of colors from white to full magenta, the print engine may create this color by varying the amount of magenta from zero to 100%, with 100% representing either a fully saturated magenta or the maximum amount of ink the print engine will allow. Such a range of colors printed with a printer""s primary colors (cyan, magenta, yellow) will use the full range of 256 levels since only one ink is used.
However, when the printer is used to produce colors from white to blue, which is composed of cyan and magenta, the print engine will typically vary the amount of cyan and magenta from zero to as little as 50% of the maximum allowable ink for each colorant so that the total amount of ink deposited for the blue is no more than the maximum allowable quantity of ink for that pixel position. Hence, to create a secondary color, requiring two primary ink colors, as little as 50% of each primary colorant may be used. This situation is worsened when all three primary inks (CMY) must be used to create the color, such as when producing a composite grayscale ramp. In the case of a grayscale ramp, printing the gray tones from white to black will vary the amount of CMY ink from zero to as little as 33% of the maximum allowable ink for each colorant, since an equal amount of the C, M and Y inks must be used to create black and the total amount of ink deposited to create black is limited to the maximum ink quantity of approximately 100%.
Since 100% of each primary ink color is not used, this causes quantization (gradation) problems when the 8-bit/plane RGB data is transformed (color matched) into the printer specific color space, such as CMY or CMYK (if black ink is also used in the printer), where multiple unique RGB values are mapped to a single CMY or CMYK value. Typically, the 24-bit RGB data (8-bits/plane) is used to specify an 8-bits/plane CMYK color as the internal representation of a continuous tone device space color. When producing the blue gradient, the 256 levels of color from white to pure blue (R, G, B=255, 255, 255 to R, G, B=0, 0, 255) will be mapped into only approximately 128 levels of CMYK (C, M, Y, K=0,0,0, 0 to C, M, Y, K=128,128, 0, 0). Thus, on average, two levels of CMYK color will be mapped to each of the 256 levels of the RGB color. With a composite grayscale tone range, as few as 85 CMY levels (256/3) may be created, causing even more visible gradation stair-steps or banding in the printed output due to a greater level of quantization during the color space transformation.
The following TABLE I demonstrates how a grayscale tone ramp from white to black is mapped from RGB data to CMY data for a typical CMY inkjet printer. Only ten levels are shown for simplicity starting from pure white. In this grayscale tone map, for the 256 input RGB tone levels, substantially fewer than 256 output CMY tone levels are used, which results in as many as three RGB input tone values mapping to a single CMY output tone value.
FIG. 1 illustrates a conventional process performed by a printer in combination with a conventional computer. In step 1, the initial monitor RGB data is generated using, for example, 8 bits per plane.
In step 2, this RGB data is transformed into the color space of the printer, such as the CMY color space. This transformation may be performed using a look-up table or an algorithm. The output of step 2 is CMY data with 8-bits per plane, and, for composite colors, the same CMY color value will be used for more than one RGB color value due to the limitations of the conventional printer as previously described. As previously mentioned, this is a source of visible contouring or banding in the printed image. In step 3, the CMY continuous tone color will be converted into a halftone pattern of dots of the C, M and Y inks. Conventional halftoning techniques include error diffusion, ordered dithering using a threshold array, or other conventional techniques.
In step 4, the data is then used to energize ink ejection elements in a printhead to print the CMY dots on a medium.
What is needed is a technique for reducing the extent of contouring or banding hen printing shades of colors.
One technique described to greatly reduce or avoid contouring or banding when printing shades of colors is to perform a dither-like process on the original monitor RGB data to generate different RGB data values for each original monitor RGB data value. One example of the dither process is to generate a first RGB value greater than the original RGB value and a second RGB value less than the original RGB value, so that the average of the two values equals the original RGB value. Each of the two RGB values is then associated with a different CMY value when mapping the RGB color space into the printer""s CMY color space, so that the average of the two CMY values is approximately that needed to represent the original RGB value.
The dithering reduces the effects of the quantization by varying the RGB data enough so that it dithers across the quantization boundaries and creates, on average, a unique and correct CMY output tone for each RGB input tone.
In one embodiment, noise is added to the original RGB value. This is a form of dithering. For example, for a gray scale, the noise is either 1, 0, or xe2x88x921 added to the individual RGB planes, so that a single RGB value may be dithered into three different RGB values whose average is the original RGB value. Each of these three RGB values is then associated with a CMY value, whose average is a unique/correct CMY value corresponding to the original RGB value. This triples the number of effective CMY color levels so that the 256 RGB levels have a corresponding 256 CMY levels.
In another embodiment, assume the original RGB value is 253, 253, 253. This value may be dithered down to 7-bits/plane of precision. This produces a dither between two values, each representing fifty percent of the pixel color, the first value being 254, 254, 254 and the second value being 252, 252, 252. These corresponding CMY values may be 0,0,0 and 1,1,1, on average creating an equivalent CMY color of 0.5, 0.5, 0.5. Such a CMY color was not available using conventional techniques. Even numbered RGB color planes, such as 252, 252, 252, are not dithered since they are precisely represented with 7-bits/plane of precision. The generated CMY values in one example range from 0 to 128 when reproducing secondary colors, while the RGB values range from 0 to 255. However, for the types of systems described, the inventive technique generates a unique average CMY value for virtually each RGB value, effectively providing 256 CMY unique color values.
An additional benefit of this technique, where the RGB data is dithered down to 7-bits/plane of precision, is that the RGB-to-CMY color space transformation step is only required to handle 21-bit RGB data.
The remainder of the printing process may be identical to that of the prior art where the generated CMY continuous tone values are then halftoned and printed. This process is also applicable to non-printer applications.